package Engine;

import Model.Usuario;
import Teste.LoginBean;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name = "player")
@SessionScoped

public class Player {
    
    private int doces;
    private int clique;
    private long id;
    private String apelido;
    private String senha;

    public Player() {

    }

    public long getGold() {
        return doces;
    }

    public void getDoces(int doces) {
        this.doces = doces;
    }

    public void total(int gold) {
        this.doces = gold;
    }

    public void incrementa() {
        this.doces += (1 * this.clique);

    }

    public int getDoces() {
        return doces;
    }

    public void setDoces(int doces) {
        this.doces = doces;
    }

    public int getClique() {
        return clique;
    }

    public void setClique(int clique) {
        this.clique = clique;
    }

    public void buyHand(int hand) {
        this.clique = hand;
    }
    
    public Usuario criaUsuario(){
        Usuario tmp = new Usuario();
        tmp.setApelido(apelido);
        tmp.setClique(clique);
        tmp.setDoces(doces);
        tmp.setId(id);
        tmp.setSenha(senha);
        
        return tmp;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getApelido() {
        return apelido;
    }

    public void setApelido(String apelido) {
        this.apelido = apelido;
    }

    public String getSenha() {
        return senha;
    }

    public void setSenha(String senha) {
        this.senha = senha;
    }

}
